<div class="content-titulo">
    <h2><?php echo $this->titulo;?></h2>
    <div class="content-btn">
        <a href="<?php echo $this->url(array('controller' => $this->controller, 'action' => 'edit')); ?>">+</a>
    </div>
</div>

<div class="content-table">
    <table id="tlist">
        <thead>
            <tr>
                <th>Data Cad.</th>
                <th>Nome</th>
                <th>Login</th>
                <th>E-mail</th>
                <th>Grupo</th>
                <th>Colégio</th>
                <th>Status</th>
                <th class="bc">&nbsp;</th>
            </tr>
        </thead>
        <tbody>
            <?php foreach ($this->result as $row) { 
                $per = $this->db->fetchRow('SELECT SQL_CACHE PER_NOME FROM PERMISSAO WHERE PER_ID = '.$row['PER_ID']);
            ?>
                <tr>
                    <td><?php echo Datetools::amd_dma($row['USU_DATCAD']); ?></td>
                    <td><?php echo $row['USU_NOME']; ?></td>
                    <td><?php echo $row['USU_LOGIN']; ?></td>
                    <td><?php echo $row['USU_EMAIL']; ?></td>
                    <td><?php echo $per['PER_NOME']; ?></td>
                    <td><?php echo $row['EMP_NOM']; ?></td>
                    <td><?php echo tools::returnStatus($row['USU_STA']); ?></td>
                    <td class="bc">
                        <?php if($this->per_edt){?><a class="btn-pdr" href="<?php echo $this->url(array('controller' => $this->controller, 'action' => 'edit', 'id' => $row['USU_ID'])); ?>">Editar</a><?php }?>
                        <?php if($this->per_del){?><a class="btn-pdr" href="<?php echo $this->url(array('controller' => $this->controller, 'action' => 'delete', 'id' => $row['USU_ID'])); ?>">Deletar</a><?php }?>
                    </td>
                </tr>
            <?php } ?>
        </tbody>
    </table>
</div>
<?php echo $this->paginationControl($this->paginator, 'Sliding', 'pagination.phtml'); ?>

